+2009-01-18 Martin Nordholts <martinn@svn.gnome.org>
+
+ Since babl_foo_from_id() will not be part of the public API we can
+ revert to having the short variant babl_foo() instead of
+ babl_foo_from_name().
+
+ * babl/babl-class.h
+ * babl/babl-component.h
+ * babl/babl-conversion.c
+ * babl/babl-conversion.h
+ * babl/babl-extension.h
+ * babl/babl-fish-path.c
+ * babl/babl-fish.c
+ * babl/babl-format.c
+ * babl/babl-format.h
+ * babl/babl-image.c
+ * babl/babl-internal.h
+ * babl/babl-model.c
+ * babl/babl-model.h
+ * babl/babl-type.c
+ * babl/babl-type.h
+ * extensions/CIE-Lab.c
+ * extensions/frequency.c
+ * extensions/gegl-fixups.c
+ * extensions/gggl-lies.c
+ * extensions/gggl.c
+ * extensions/gimp-8bit.c
+ * extensions/naive-CMYK.c
+ * extensions/sse-fixups.c
+ * tests/grayscale_to_rgb.c
+ * tests/rgb_to_bgr.c
+ * tests/rgb_to_ycbcr.c
+
2009-01-18 Martin Nordholts <martinn@svn.gnome.org>
Add include guards.
#define BABL_NAMED_CLASS_DECLARE(klass) \
\
BABL_CLASS_DECLARE (klass); \
-Babl * babl_##klass##_from_name (const char *name); \
+Babl * babl_##klass (const char *name); \
Babl * babl_##klass##_new (void *first_arg, \
...) BABL_ARG_NULL_TERMINATED
* NULL);
*/
-#ifndef BABL_DISABLE_DEPRECATED
-
-#define babl_component babl_component_from_name
-
-#endif /* BABL_DISABLE_DEPRECATED */
-
typedef struct
{
Babl *fmt_source;
Babl *fmt_destination;
- Babl *fmt_rgba_double = babl_format_new (babl_model_from_name ("RGBA"),
- babl_type_from_name ("double"),
- babl_component_from_name ("R"),
- babl_component_from_name ("G"),
- babl_component_from_name ("B"),
- babl_component_from_name ("A"),
+ Babl *fmt_rgba_double = babl_format_new (babl_model ("RGBA"),
+ babl_type ("double"),
+ babl_component ("R"),
+ babl_component ("G"),
+ babl_component ("B"),
+ babl_component ("A"),
NULL);
double error = 0.0;
* NULL);
*/
-#ifndef BABL_DISABLE_DEPRECATED
-
-#define babl_conversion babl_conversion_from_name
-
-#endif /* BABL_DISABLE_DEPRECATED */
-
/* Type and Format */
typedef long (*BablFuncLinear) (char *src,
* BablExtension objects are only used internally in babl.
*/
-#ifndef BABL_DISABLE_DEPRECATED
-
-#define babl_extension babl_extension_from_name
-
-#endif /* BABL_DISABLE_DEPRECATED */
-
typedef struct
{
if (!fmt_rgba_double)
{
fmt_rgba_double = babl_format_new (
- babl_model_from_name ("RGBA"),
- babl_type_from_name ("double"),
- babl_component_from_name ("R"),
- babl_component_from_name ("G"),
- babl_component_from_name ("B"),
- babl_component_from_name ("A"),
+ babl_model ("RGBA"),
+ babl_type ("double"),
+ babl_component ("R"),
+ babl_component ("G"),
+ babl_component ("B"),
+ babl_component ("A"),
NULL);
}
source_format = source;
if (!source_format)
- source_format = babl_format_from_name ((char *) source);
+ source_format = babl_format ((char *) source);
if (!source_format)
{
destination_format = destination;
if (!destination_format)
- destination_format = babl_format_from_name ((char *) destination);
+ destination_format = babl_format ((char *) destination);
if (!destination_format)
{
Babl *fish_from;
ref_fmt = babl_format_new (
- babl_model_from_name ("RGBA"),
- babl_type_from_name ("double"),
- babl_component_from_name ("R"),
- babl_component_from_name ("G"),
- babl_component_from_name ("B"),
- babl_component_from_name ("A"),
+ babl_model ("RGBA"),
+ babl_type ("double"),
+ babl_component ("R"),
+ babl_component ("G"),
+ babl_component ("B"),
+ babl_component ("A"),
NULL);
if (babl->format.loss != -1.0)
* name is used.
*/
-#ifndef BABL_DISABLE_DEPRECATED
-
-#define babl_format babl_format_from_name
-
-#endif /* BABL_DISABLE_DEPRECATED */
-
typedef struct
{
}
else
{
- new_component = (BablComponent *) babl_component_from_name (arg);
+ new_component = (BablComponent *) babl_component (arg);
}
/* FIXME: add error checking */
BABL_CLASS_MINIMAL_IMPLEMENT(klass) \
\
Babl * \
-babl_##klass##_from_name (const char *name) \
+babl_##klass (const char *name) \
{ \
Babl *babl; \
\
if (!self)
self = babl_format_new (
- babl_model_from_name ("RGBA"),
- babl_type_from_name ("double"),
- babl_component_from_name ("R"),
- babl_component_from_name ("G"),
- babl_component_from_name ("B"),
- babl_component_from_name ("A"),
+ babl_model ("RGBA"),
+ babl_type ("double"),
+ babl_component ("R"),
+ babl_component ("G"),
+ babl_component ("B"),
+ babl_component ("A"),
NULL);
return self;
}
int i;
argument[args++] = model;
- argument[args++] = babl_type_from_name ("double");
+ argument[args++] = babl_type ("double");
for (i = 0; i < model->model.components; i++)
{
*
*/
-#ifndef BABL_DISABLE_DEPRECATED
-
-#define babl_model babl_model_from_name
-
-#endif /* BABL_DISABLE_DEPRECATED */
-
typedef struct
{
if (!self)
self = babl_format_new (
- babl_model_from_name ("Y"),
- babl_type_from_name ("double"),
- babl_component_from_name ("Y"),
+ babl_model ("Y"),
+ babl_type ("double"),
+ babl_component ("Y"),
NULL);
return self;
}
test_init (0.0, 182.0);
ref_fmt = double_vector_format ();
- fmt = babl_format_new (babl_model_from_name ("Y"),
+ fmt = babl_format_new (babl_model ("Y"),
babl,
- babl_component_from_name ("Y"),
+ babl_component ("Y"),
NULL);
fish_to = babl_fish_reference (ref_fmt, fmt);
fish_from = babl_fish_reference (fmt, ref_fmt);
* NULL);
*/
-#ifndef BABL_DISABLE_DEPRECATED
-
-#define babl_type babl_type_from_name
-
-#endif /* BABL_DISABLE_DEPRECATED */
-
typedef struct
{
{
babl_model_new (
"name", "CIE Lab",
- babl_component_from_name ("CIE L"),
- babl_component_from_name ("CIE a"),
- babl_component_from_name ("CIE b"),
+ babl_component ("CIE L"),
+ babl_component ("CIE a"),
+ babl_component ("CIE b"),
NULL);
babl_model_new (
"name", "CIE Lab alpha",
- babl_component_from_name ("CIE L"),
- babl_component_from_name ("CIE a"),
- babl_component_from_name ("CIE b"),
- babl_component_from_name ("A"),
+ babl_component ("CIE L"),
+ babl_component ("CIE a"),
+ babl_component ("CIE b"),
+ babl_component ("A"),
NULL);
}
conversions (void)
{
babl_conversion_new (
- babl_model_from_name ("RGBA"),
- babl_model_from_name ("CIE Lab"),
+ babl_model ("RGBA"),
+ babl_model ("CIE Lab"),
"linear", rgba_to_lab,
NULL
);
babl_conversion_new (
- babl_model_from_name ("CIE Lab"),
- babl_model_from_name ("RGBA"),
+ babl_model ("CIE Lab"),
+ babl_model ("RGBA"),
"linear", lab_to_rgba,
NULL
);
babl_conversion_new (
- babl_model_from_name ("RGBA"),
- babl_model_from_name ("CIE Lab alpha"),
+ babl_model ("RGBA"),
+ babl_model ("CIE Lab alpha"),
"linear", rgba_to_laba,
NULL
);
babl_conversion_new (
- babl_model_from_name ("CIE Lab alpha"),
- babl_model_from_name ("RGBA"),
+ babl_model ("CIE Lab alpha"),
+ babl_model ("RGBA"),
"linear", laba_to_rgba,
NULL
);
{
babl_format_new (
"name", "CIE Lab float",
- babl_model_from_name ("CIE Lab"),
+ babl_model ("CIE Lab"),
- babl_type_from_name ("float"),
- babl_component_from_name ("CIE L"),
- babl_component_from_name ("CIE a"),
- babl_component_from_name ("CIE b"),
+ babl_type ("float"),
+ babl_component ("CIE L"),
+ babl_component ("CIE a"),
+ babl_component ("CIE b"),
NULL);
babl_format_new (
"name", "CIE Lab alpha float",
- babl_model_from_name ("CIE Lab alpha"),
+ babl_model ("CIE Lab alpha"),
- babl_type_from_name ("double"),
- babl_component_from_name ("CIE L"),
- babl_component_from_name ("CIE a"),
- babl_component_from_name ("CIE b"),
- babl_component_from_name ("A"),
+ babl_type ("double"),
+ babl_component ("CIE L"),
+ babl_component ("CIE a"),
+ babl_component ("CIE b"),
+ babl_component ("A"),
NULL);
babl_format_new (
"name", "CIE Lab u8",
- babl_model_from_name ("CIE Lab"),
-
- babl_type_from_name ("CIE u8 L"),
- babl_component_from_name ("CIE L"),
- babl_type_from_name ("CIE u8 ab"),
- babl_component_from_name ("CIE a"),
- babl_type_from_name ("CIE u8 ab"),
- babl_component_from_name ("CIE b"),
+ babl_model ("CIE Lab"),
+
+ babl_type ("CIE u8 L"),
+ babl_component ("CIE L"),
+ babl_type ("CIE u8 ab"),
+ babl_component ("CIE a"),
+ babl_type ("CIE u8 ab"),
+ babl_component ("CIE b"),
NULL);
babl_format_new (
"name", "CIE Lab u16",
- babl_model_from_name ("CIE Lab"),
-
- babl_type_from_name ("CIE u16 L"),
- babl_component_from_name ("CIE L"),
- babl_type_from_name ("CIE u16 ab"),
- babl_component_from_name ("CIE a"),
- babl_type_from_name ("CIE u16 ab"),
- babl_component_from_name ("CIE b"),
+ babl_model ("CIE Lab"),
+
+ babl_type ("CIE u16 L"),
+ babl_component ("CIE L"),
+ babl_type ("CIE u16 ab"),
+ babl_component ("CIE a"),
+ babl_type ("CIE u16 ab"),
+ babl_component ("CIE b"),
NULL);
}
);
babl_conversion_new (
- babl_type_from_name ("CIE u8 L"),
- babl_type_from_name ("double"),
+ babl_type ("CIE u8 L"),
+ babl_type ("double"),
"plane", convert_u8_l_double,
NULL
);
babl_conversion_new (
- babl_type_from_name ("double"),
- babl_type_from_name ("CIE u8 L"),
+ babl_type ("double"),
+ babl_type ("CIE u8 L"),
"plane", convert_double_u8_l,
NULL
);
babl_conversion_new (
- babl_type_from_name ("CIE u8 ab"),
- babl_type_from_name ("double"),
+ babl_type ("CIE u8 ab"),
+ babl_type ("double"),
"plane", convert_u8_ab_double,
NULL
);
babl_conversion_new (
- babl_type_from_name ("double"),
- babl_type_from_name ("CIE u8 ab"),
+ babl_type ("double"),
+ babl_type ("CIE u8 ab"),
"plane", convert_double_u8_ab,
NULL
);
babl_conversion_new (
- babl_type_from_name ("CIE u16 L"),
- babl_type_from_name ("double"),
+ babl_type ("CIE u16 L"),
+ babl_type ("double"),
"plane", convert_u16_l_double,
NULL
);
babl_conversion_new (
- babl_type_from_name ("double"),
- babl_type_from_name ("CIE u16 L"),
+ babl_type ("double"),
+ babl_type ("CIE u16 L"),
"plane", convert_double_u16_l,
NULL
);
babl_conversion_new (
- babl_type_from_name ("CIE u16 ab"),
- babl_type_from_name ("double"),
+ babl_type ("CIE u16 ab"),
+ babl_type ("double"),
"plane", convert_u16_ab_double,
NULL
);
babl_conversion_new (
- babl_type_from_name ("double"),
- babl_type_from_name ("CIE u16 ab"),
+ babl_type ("double"),
+ babl_type ("CIE u16 ab"),
"plane", convert_double_u16_ab,
NULL
);
babl_model_new (
"name", "frequency",
- babl_component_from_name ("Rr"),
- babl_component_from_name ("Gr"),
- babl_component_from_name ("Br"),
- babl_component_from_name ("Ar"),
- babl_component_from_name ("Ri"),
- babl_component_from_name ("Gi"),
- babl_component_from_name ("Bi"),
- babl_component_from_name ("Ai"),
+ babl_component ("Rr"),
+ babl_component ("Gr"),
+ babl_component ("Br"),
+ babl_component ("Ar"),
+ babl_component ("Ri"),
+ babl_component ("Gi"),
+ babl_component ("Bi"),
+ babl_component ("Ai"),
NULL
);
babl_conversion_new (
- babl_model_from_name ("RGBA"),
- babl_model_from_name ("frequency"),
+ babl_model ("RGBA"),
+ babl_model ("frequency"),
"linear", rgba_to_frequency,
NULL
);
babl_conversion_new (
- babl_model_from_name ("frequency"),
- babl_model_from_name ("RGBA"),
+ babl_model ("frequency"),
+ babl_model ("RGBA"),
"linear", frequency_to_rgba,
NULL
);
babl_format_new (
"name", "frequency float",
- babl_model_from_name ("frequency"),
- babl_component_from_name ("Rr"),
- babl_component_from_name ("Gr"),
- babl_component_from_name ("Br"),
- babl_component_from_name ("Ar"),
- babl_component_from_name ("Ri"),
- babl_component_from_name ("Gi"),
- babl_component_from_name ("Bi"),
- babl_component_from_name ("Ai"),
+ babl_model ("frequency"),
+ babl_component ("Rr"),
+ babl_component ("Gr"),
+ babl_component ("Br"),
+ babl_component ("Ar"),
+ babl_component ("Ri"),
+ babl_component ("Gi"),
+ babl_component ("Bi"),
+ babl_component ("Ai"),
NULL
);
babl_format_new (
"name", "frequency double",
- babl_model_from_name ("frequency"),
- babl_type_from_name ("double"),
- babl_component_from_name ("Rr"),
- babl_component_from_name ("Gr"),
- babl_component_from_name ("Br"),
- babl_component_from_name ("Ar"),
- babl_component_from_name ("Ri"),
- babl_component_from_name ("Gi"),
- babl_component_from_name ("Bi"),
- babl_component_from_name ("Ai"),
+ babl_model ("frequency"),
+ babl_type ("double"),
+ babl_component ("Rr"),
+ babl_component ("Gr"),
+ babl_component ("Br"),
+ babl_component ("Ar"),
+ babl_component ("Ri"),
+ babl_component ("Gi"),
+ babl_component ("Bi"),
+ babl_component ("Ai"),
NULL
);
init (void)
{
Babl *rgbaF = babl_format_new (
- babl_model_from_name ("RGBA"),
- babl_type_from_name ("float"),
- babl_component_from_name ("R"),
- babl_component_from_name ("G"),
- babl_component_from_name ("B"),
- babl_component_from_name ("A"),
+ babl_model ("RGBA"),
+ babl_type ("float"),
+ babl_component ("R"),
+ babl_component ("G"),
+ babl_component ("B"),
+ babl_component ("A"),
NULL);
Babl *rgbAF = babl_format_new (
- babl_model_from_name ("RaGaBaA"),
- babl_type_from_name ("float"),
- babl_component_from_name ("Ra"),
- babl_component_from_name ("Ga"),
- babl_component_from_name ("Ba"),
- babl_component_from_name ("A"),
+ babl_model ("RaGaBaA"),
+ babl_type ("float"),
+ babl_component ("Ra"),
+ babl_component ("Ga"),
+ babl_component ("Ba"),
+ babl_component ("A"),
NULL);
Babl *lrgba8 = babl_format_new (
- babl_model_from_name ("RGBA"),
- babl_type_from_name ("u8"),
- babl_component_from_name ("R"),
- babl_component_from_name ("G"),
- babl_component_from_name ("B"),
- babl_component_from_name ("A"),
+ babl_model ("RGBA"),
+ babl_type ("u8"),
+ babl_component ("R"),
+ babl_component ("G"),
+ babl_component ("B"),
+ babl_component ("A"),
NULL);
Babl *rgba8 = babl_format_new (
- babl_model_from_name ("R'G'B'A"),
- babl_type_from_name ("u8"),
- babl_component_from_name ("R'"),
- babl_component_from_name ("G'"),
- babl_component_from_name ("B'"),
- babl_component_from_name ("A"),
+ babl_model ("R'G'B'A"),
+ babl_type ("u8"),
+ babl_component ("R'"),
+ babl_component ("G'"),
+ babl_component ("B'"),
+ babl_component ("A"),
NULL);
Babl *bgrA8 = babl_format_new (
"name", "B'aG'aR'aA u8",
- babl_model_from_name ("R'aG'aB'aA"),
- babl_type_from_name ("u8"),
- babl_component_from_name ("B'a"),
- babl_component_from_name ("G'a"),
- babl_component_from_name ("R'a"),
- babl_component_from_name ("A"),
+ babl_model ("R'aG'aB'aA"),
+ babl_type ("u8"),
+ babl_component ("B'a"),
+ babl_component ("G'a"),
+ babl_component ("R'a"),
+ babl_component ("A"),
NULL);
Babl *rgb8 = babl_format_new (
- babl_model_from_name ("R'G'B'"),
- babl_type_from_name ("u8"),
- babl_component_from_name ("R'"),
- babl_component_from_name ("G'"),
- babl_component_from_name ("B'"),
+ babl_model ("R'G'B'"),
+ babl_type ("u8"),
+ babl_component ("R'"),
+ babl_component ("G'"),
+ babl_component ("B'"),
NULL);
Babl *sdl32 = babl_format_new (
"name", "B'aG'aR'aPAD u8",
- babl_model_from_name ("R'G'B'"),
- babl_type_from_name ("u8"),
- babl_component_from_name ("B'"),
- babl_component_from_name ("G'"),
- babl_component_from_name ("R'"),
- babl_component_from_name ("PAD"),
+ babl_model ("R'G'B'"),
+ babl_type ("u8"),
+ babl_component ("B'"),
+ babl_component ("G'"),
+ babl_component ("R'"),
+ babl_component ("PAD"),
NULL);
table_init ();
init (void)
{
Babl *rgbaF = babl_format_new (
- babl_model_from_name ("RGBA"),
- babl_type_from_name ("float"),
- babl_component_from_name ("R"),
- babl_component_from_name ("G"),
- babl_component_from_name ("B"),
- babl_component_from_name ("A"),
+ babl_model ("RGBA"),
+ babl_type ("float"),
+ babl_component ("R"),
+ babl_component ("G"),
+ babl_component ("B"),
+ babl_component ("A"),
NULL);
Babl *rgba16 = babl_format_new (
- babl_model_from_name ("RGBA"),
- babl_type_from_name ("u16"),
- babl_component_from_name ("R"),
- babl_component_from_name ("G"),
- babl_component_from_name ("B"),
- babl_component_from_name ("A"),
+ babl_model ("RGBA"),
+ babl_type ("u16"),
+ babl_component ("R"),
+ babl_component ("G"),
+ babl_component ("B"),
+ babl_component ("A"),
NULL);
Babl *rgbaD = babl_format_new (
- babl_model_from_name ("RGBA"),
- babl_type_from_name ("double"),
- babl_component_from_name ("R"),
- babl_component_from_name ("G"),
- babl_component_from_name ("B"),
- babl_component_from_name ("A"),
+ babl_model ("RGBA"),
+ babl_type ("double"),
+ babl_component ("R"),
+ babl_component ("G"),
+ babl_component ("B"),
+ babl_component ("A"),
NULL);
Babl *rgba8 = babl_format_new (
- babl_model_from_name ("RGBA"),
- babl_type_from_name ("u8"),
- babl_component_from_name ("R"),
- babl_component_from_name ("G"),
- babl_component_from_name ("B"),
- babl_component_from_name ("A"),
+ babl_model ("RGBA"),
+ babl_type ("u8"),
+ babl_component ("R"),
+ babl_component ("G"),
+ babl_component ("B"),
+ babl_component ("A"),
NULL);
Babl *rgbAF = babl_format_new (
- babl_model_from_name ("RaGaBaA"),
- babl_type_from_name ("float"),
- babl_component_from_name ("Ra"),
- babl_component_from_name ("Ga"),
- babl_component_from_name ("Ba"),
- babl_component_from_name ("A"),
+ babl_model ("RaGaBaA"),
+ babl_type ("float"),
+ babl_component ("Ra"),
+ babl_component ("Ga"),
+ babl_component ("Ba"),
+ babl_component ("A"),
NULL);
Babl *rgbA16 = babl_format_new (
- babl_model_from_name ("RaGaBaA"),
- babl_type_from_name ("u16"),
- babl_component_from_name ("Ra"),
- babl_component_from_name ("Ga"),
- babl_component_from_name ("Ba"),
- babl_component_from_name ("A"),
+ babl_model ("RaGaBaA"),
+ babl_type ("u16"),
+ babl_component ("Ra"),
+ babl_component ("Ga"),
+ babl_component ("Ba"),
+ babl_component ("A"),
NULL);
Babl *rgbA8 = babl_format_new (
- babl_model_from_name ("RaGaBaA"),
- babl_type_from_name ("u8"),
- babl_component_from_name ("Ra"),
- babl_component_from_name ("Ga"),
- babl_component_from_name ("Ba"),
- babl_component_from_name ("A"),
+ babl_model ("RaGaBaA"),
+ babl_type ("u8"),
+ babl_component ("Ra"),
+ babl_component ("Ga"),
+ babl_component ("Ba"),
+ babl_component ("A"),
NULL);
Babl *rgbF = babl_format_new (
- babl_model_from_name ("RGB"),
- babl_type_from_name ("float"),
- babl_component_from_name ("R"),
- babl_component_from_name ("G"),
- babl_component_from_name ("B"),
+ babl_model ("RGB"),
+ babl_type ("float"),
+ babl_component ("R"),
+ babl_component ("G"),
+ babl_component ("B"),
NULL);
Babl *rgb16 = babl_format_new (
- babl_model_from_name ("RGB"),
- babl_type_from_name ("u16"),
- babl_component_from_name ("R"),
- babl_component_from_name ("G"),
- babl_component_from_name ("B"),
+ babl_model ("RGB"),
+ babl_type ("u16"),
+ babl_component ("R"),
+ babl_component ("G"),
+ babl_component ("B"),
NULL);
Babl *rgb8 = babl_format_new (
- babl_model_from_name ("RGB"),
- babl_type_from_name ("u8"),
- babl_component_from_name ("R"),
- babl_component_from_name ("G"),
- babl_component_from_name ("B"),
+ babl_model ("RGB"),
+ babl_type ("u8"),
+ babl_component ("R"),
+ babl_component ("G"),
+ babl_component ("B"),
NULL);
Babl *gaF = babl_format_new (
- babl_model_from_name ("YA"),
- babl_type_from_name ("float"),
- babl_component_from_name ("Y"),
- babl_component_from_name ("A"),
+ babl_model ("YA"),
+ babl_type ("float"),
+ babl_component ("Y"),
+ babl_component ("A"),
NULL);
Babl *gAF = babl_format_new (
- babl_model_from_name ("YaA"),
- babl_type_from_name ("float"),
- babl_component_from_name ("Ya"),
- babl_component_from_name ("A"),
+ babl_model ("YaA"),
+ babl_type ("float"),
+ babl_component ("Ya"),
+ babl_component ("A"),
NULL);
Babl *gF = babl_format_new (
- babl_model_from_name ("Y"),
- babl_type_from_name ("float"),
- babl_component_from_name ("Y"),
+ babl_model ("Y"),
+ babl_type ("float"),
+ babl_component ("Y"),
NULL);
Babl *ga16 = babl_format_new (
- babl_model_from_name ("YA"),
- babl_type_from_name ("u16"),
- babl_component_from_name ("Y"),
- babl_component_from_name ("A"),
+ babl_model ("YA"),
+ babl_type ("u16"),
+ babl_component ("Y"),
+ babl_component ("A"),
NULL);
Babl *gA16 = babl_format_new (
- babl_model_from_name ("YaA"),
- babl_type_from_name ("u16"),
- babl_component_from_name ("Ya"),
- babl_component_from_name ("A"),
+ babl_model ("YaA"),
+ babl_type ("u16"),
+ babl_component ("Ya"),
+ babl_component ("A"),
NULL);
Babl *g16 = babl_format_new (
- babl_model_from_name ("Y"),
- babl_type_from_name ("u16"),
- babl_component_from_name ("Y"),
+ babl_model ("Y"),
+ babl_type ("u16"),
+ babl_component ("Y"),
NULL);
Babl *ga8 = babl_format_new (
- babl_model_from_name ("YA"),
- babl_type_from_name ("u8"),
- babl_component_from_name ("Y"),
- babl_component_from_name ("A"),
+ babl_model ("YA"),
+ babl_type ("u8"),
+ babl_component ("Y"),
+ babl_component ("A"),
NULL);
Babl *gA8 = babl_format_new (
- babl_model_from_name ("YaA"),
- babl_type_from_name ("u8"),
- babl_component_from_name ("Ya"),
- babl_component_from_name ("A"),
+ babl_model ("YaA"),
+ babl_type ("u8"),
+ babl_component ("Ya"),
+ babl_component ("A"),
NULL);
Babl *g8 = babl_format_new (
- babl_model_from_name ("Y"),
- babl_type_from_name ("u8"),
- babl_component_from_name ("Y"),
+ babl_model ("Y"),
+ babl_type ("u8"),
+ babl_component ("Y"),
NULL);
Babl *yuv8 = babl_format_new (
"name", "Y'CbCr u8",
- babl_model_from_name ("Y'CbCr"),
- babl_type_from_name ("u8-luma"),
- babl_component_from_name ("Y'"),
- babl_type_from_name ("u8-chroma"),
- babl_component_from_name ("Cb"),
- babl_component_from_name ("Cr"),
+ babl_model ("Y'CbCr"),
+ babl_type ("u8-luma"),
+ babl_component ("Y'"),
+ babl_type ("u8-chroma"),
+ babl_component ("Cb"),
+ babl_component ("Cr"),
NULL);
Babl *yuvF = babl_format_new (
- babl_model_from_name ("Y'CbCr"),
- babl_type_from_name ("float"),
- babl_component_from_name ("Y'"),
- babl_type_from_name ("float"),
- babl_component_from_name ("Cb"),
- babl_component_from_name ("Cr"),
+ babl_model ("Y'CbCr"),
+ babl_type ("float"),
+ babl_component ("Y'"),
+ babl_type ("float"),
+ babl_component ("Cb"),
+ babl_component ("Cr"),
NULL);
Babl *yuvaF = babl_format_new (
- babl_model_from_name ("Y'CbCrA"),
- babl_type_from_name ("float"),
- babl_component_from_name ("Y'"),
- babl_type_from_name ("float"),
- babl_component_from_name ("Cb"),
- babl_component_from_name ("Cr"),
- babl_component_from_name ("A"),
+ babl_model ("Y'CbCrA"),
+ babl_type ("float"),
+ babl_component ("Y'"),
+ babl_type ("float"),
+ babl_component ("Cb"),
+ babl_component ("Cr"),
+ babl_component ("A"),
NULL);
#define o(src, dst) \
init (void)
{
Babl *rgbaD = babl_format_new (
- babl_model_from_name ("R'G'B'A"),
- babl_type_from_name ("double"),
- babl_component_from_name ("R'"),
- babl_component_from_name ("G'"),
- babl_component_from_name ("B'"),
- babl_component_from_name ("A"),
+ babl_model ("R'G'B'A"),
+ babl_type ("double"),
+ babl_component ("R'"),
+ babl_component ("G'"),
+ babl_component ("B'"),
+ babl_component ("A"),
NULL);
Babl *rgbaF = babl_format_new (
- babl_model_from_name ("R'G'B'A"),
- babl_type_from_name ("float"),
- babl_component_from_name ("R'"),
- babl_component_from_name ("G'"),
- babl_component_from_name ("B'"),
- babl_component_from_name ("A"),
+ babl_model ("R'G'B'A"),
+ babl_type ("float"),
+ babl_component ("R'"),
+ babl_component ("G'"),
+ babl_component ("B'"),
+ babl_component ("A"),
NULL);
Babl *rgba16 = babl_format_new (
- babl_model_from_name ("R'G'B'A"),
- babl_type_from_name ("u16"),
- babl_component_from_name ("R'"),
- babl_component_from_name ("G'"),
- babl_component_from_name ("B'"),
- babl_component_from_name ("A"),
+ babl_model ("R'G'B'A"),
+ babl_type ("u16"),
+ babl_component ("R'"),
+ babl_component ("G'"),
+ babl_component ("B'"),
+ babl_component ("A"),
NULL);
Babl *rgba8 = babl_format_new (
- babl_model_from_name ("R'G'B'A"),
- babl_type_from_name ("u8"),
- babl_component_from_name ("R'"),
- babl_component_from_name ("G'"),
- babl_component_from_name ("B'"),
- babl_component_from_name ("A"),
+ babl_model ("R'G'B'A"),
+ babl_type ("u8"),
+ babl_component ("R'"),
+ babl_component ("G'"),
+ babl_component ("B'"),
+ babl_component ("A"),
NULL);
Babl *rgbAF = babl_format_new (
- babl_model_from_name ("R'aG'aB'aA"),
- babl_type_from_name ("float"),
- babl_component_from_name ("R'a"),
- babl_component_from_name ("G'a"),
- babl_component_from_name ("B'a"),
- babl_component_from_name ("A"),
+ babl_model ("R'aG'aB'aA"),
+ babl_type ("float"),
+ babl_component ("R'a"),
+ babl_component ("G'a"),
+ babl_component ("B'a"),
+ babl_component ("A"),
NULL);
Babl *rgbA16 = babl_format_new (
- babl_model_from_name ("R'aG'aB'aA"),
- babl_type_from_name ("u16"),
- babl_component_from_name ("R'a"),
- babl_component_from_name ("G'a"),
- babl_component_from_name ("B'a"),
- babl_component_from_name ("A"),
+ babl_model ("R'aG'aB'aA"),
+ babl_type ("u16"),
+ babl_component ("R'a"),
+ babl_component ("G'a"),
+ babl_component ("B'a"),
+ babl_component ("A"),
NULL);
Babl *rgbA8 = babl_format_new (
- babl_model_from_name ("R'aG'aB'aA"),
- babl_type_from_name ("u8"),
- babl_component_from_name ("R'a"),
- babl_component_from_name ("G'a"),
- babl_component_from_name ("B'a"),
- babl_component_from_name ("A"),
+ babl_model ("R'aG'aB'aA"),
+ babl_type ("u8"),
+ babl_component ("R'a"),
+ babl_component ("G'a"),
+ babl_component ("B'a"),
+ babl_component ("A"),
NULL);
Babl *rgbF = babl_format_new (
- babl_model_from_name ("R'G'B'"),
- babl_type_from_name ("float"),
- babl_component_from_name ("R'"),
- babl_component_from_name ("G'"),
- babl_component_from_name ("B'"),
+ babl_model ("R'G'B'"),
+ babl_type ("float"),
+ babl_component ("R'"),
+ babl_component ("G'"),
+ babl_component ("B'"),
NULL);
Babl *rgb16 = babl_format_new (
- babl_model_from_name ("R'G'B'"),
- babl_type_from_name ("u16"),
- babl_component_from_name ("R'"),
- babl_component_from_name ("G'"),
- babl_component_from_name ("B'"),
+ babl_model ("R'G'B'"),
+ babl_type ("u16"),
+ babl_component ("R'"),
+ babl_component ("G'"),
+ babl_component ("B'"),
NULL);
Babl *rgb8 = babl_format_new (
- babl_model_from_name ("R'G'B'"),
- babl_type_from_name ("u8"),
- babl_component_from_name ("R'"),
- babl_component_from_name ("G'"),
- babl_component_from_name ("B'"),
+ babl_model ("R'G'B'"),
+ babl_type ("u8"),
+ babl_component ("R'"),
+ babl_component ("G'"),
+ babl_component ("B'"),
NULL);
Babl *gaF = babl_format_new (
- babl_model_from_name ("Y'A"),
- babl_type_from_name ("float"),
- babl_component_from_name ("Y'"),
- babl_component_from_name ("A"),
+ babl_model ("Y'A"),
+ babl_type ("float"),
+ babl_component ("Y'"),
+ babl_component ("A"),
NULL);
Babl *gAF = babl_format_new (
- babl_model_from_name ("Y'aA"),
- babl_type_from_name ("float"),
- babl_component_from_name ("Y'a"),
- babl_component_from_name ("A"),
+ babl_model ("Y'aA"),
+ babl_type ("float"),
+ babl_component ("Y'a"),
+ babl_component ("A"),
NULL);
Babl *gF = babl_format_new (
- babl_model_from_name ("Y'"),
- babl_type_from_name ("float"),
- babl_component_from_name ("Y'"),
+ babl_model ("Y'"),
+ babl_type ("float"),
+ babl_component ("Y'"),
NULL);
Babl *ga16 = babl_format_new (
- babl_model_from_name ("Y'A"),
- babl_type_from_name ("u16"),
- babl_component_from_name ("Y'"),
- babl_component_from_name ("A"),
+ babl_model ("Y'A"),
+ babl_type ("u16"),
+ babl_component ("Y'"),
+ babl_component ("A"),
NULL);
Babl *gA16 = babl_format_new (
- babl_model_from_name ("Y'aA"),
- babl_type_from_name ("u16"),
- babl_component_from_name ("Y'a"),
- babl_component_from_name ("A"),
+ babl_model ("Y'aA"),
+ babl_type ("u16"),
+ babl_component ("Y'a"),
+ babl_component ("A"),
NULL);
Babl *g16 = babl_format_new (
- babl_model_from_name ("Y'"),
- babl_type_from_name ("u16"),
- babl_component_from_name ("Y'"),
+ babl_model ("Y'"),
+ babl_type ("u16"),
+ babl_component ("Y'"),
NULL);
Babl *ga8 = babl_format_new (
- babl_model_from_name ("Y'A"),
- babl_type_from_name ("u8"),
- babl_component_from_name ("Y'"),
- babl_component_from_name ("A"),
+ babl_model ("Y'A"),
+ babl_type ("u8"),
+ babl_component ("Y'"),
+ babl_component ("A"),
NULL);
Babl *gA8 = babl_format_new (
- babl_model_from_name ("Y'aA"),
- babl_type_from_name ("u8"),
- babl_component_from_name ("Y'a"),
- babl_component_from_name ("A"),
+ babl_model ("Y'aA"),
+ babl_type ("u8"),
+ babl_component ("Y'a"),
+ babl_component ("A"),
NULL);
Babl *g8 = babl_format_new (
- babl_model_from_name ("Y'"),
- babl_type_from_name ("u8"),
- babl_component_from_name ("Y'"),
+ babl_model ("Y'"),
+ babl_type ("u8"),
+ babl_component ("Y'"),
NULL);
Babl *yuv8 = babl_format_new (
"name", "Y'CbCr u8",
- babl_model_from_name ("Y'CbCr"),
- babl_type_from_name ("u8-luma"),
- babl_component_from_name ("Y'"),
- babl_type_from_name ("u8-chroma"),
- babl_component_from_name ("Cb"),
- babl_component_from_name ("Cr"),
+ babl_model ("Y'CbCr"),
+ babl_type ("u8-luma"),
+ babl_component ("Y'"),
+ babl_type ("u8-chroma"),
+ babl_component ("Cb"),
+ babl_component ("Cr"),
NULL);
Babl *yuvF = babl_format_new (
- babl_model_from_name ("Y'CbCr"),
- babl_type_from_name ("float"),
- babl_component_from_name ("Y'"),
- babl_type_from_name ("float"),
- babl_component_from_name ("Cb"),
- babl_component_from_name ("Cr"),
+ babl_model ("Y'CbCr"),
+ babl_type ("float"),
+ babl_component ("Y'"),
+ babl_type ("float"),
+ babl_component ("Cb"),
+ babl_component ("Cr"),
NULL);
Babl *yuvaF = babl_format_new (
- babl_model_from_name ("Y'CbCrA"),
- babl_type_from_name ("float"),
- babl_component_from_name ("Y'"),
- babl_type_from_name ("float"),
- babl_component_from_name ("Cb"),
- babl_component_from_name ("Cr"),
- babl_component_from_name ("A"),
+ babl_model ("Y'CbCrA"),
+ babl_type ("float"),
+ babl_component ("Y'"),
+ babl_type ("float"),
+ babl_component ("Cb"),
+ babl_component ("Cr"),
+ babl_component ("A"),
NULL);
#define o(src, dst) \
init (void)
{
Babl *rgbaF_linear = babl_format_new (
- babl_model_from_name ("RGBA"),
- babl_type_from_name ("float"),
- babl_component_from_name ("R"),
- babl_component_from_name ("G"),
- babl_component_from_name ("B"),
- babl_component_from_name ("A"),
+ babl_model ("RGBA"),
+ babl_type ("float"),
+ babl_component ("R"),
+ babl_component ("G"),
+ babl_component ("B"),
+ babl_component ("A"),
NULL);
Babl *rgba8_linear = babl_format_new (
- babl_model_from_name ("RGBA"),
- babl_type_from_name ("u8"),
- babl_component_from_name ("R"),
- babl_component_from_name ("G"),
- babl_component_from_name ("B"),
- babl_component_from_name ("A"),
+ babl_model ("RGBA"),
+ babl_type ("u8"),
+ babl_component ("R"),
+ babl_component ("G"),
+ babl_component ("B"),
+ babl_component ("A"),
NULL);
Babl *rgba8_gamma_2_2 = babl_format_new (
- babl_model_from_name ("R'G'B'A"),
- babl_type_from_name ("u8"),
- babl_component_from_name ("R'"),
- babl_component_from_name ("G'"),
- babl_component_from_name ("B'"),
- babl_component_from_name ("A"),
+ babl_model ("R'G'B'A"),
+ babl_type ("u8"),
+ babl_component ("R'"),
+ babl_component ("G'"),
+ babl_component ("B'"),
+ babl_component ("A"),
NULL);
Babl *rgbF_linear = babl_format_new (
- babl_model_from_name ("RGB"),
- babl_type_from_name ("float"),
- babl_component_from_name ("R"),
- babl_component_from_name ("G"),
- babl_component_from_name ("B"),
+ babl_model ("RGB"),
+ babl_type ("float"),
+ babl_component ("R"),
+ babl_component ("G"),
+ babl_component ("B"),
NULL);
Babl *rgb8_linear = babl_format_new (
- babl_model_from_name ("RGB"),
- babl_type_from_name ("u8"),
- babl_component_from_name ("R"),
- babl_component_from_name ("G"),
- babl_component_from_name ("B"),
+ babl_model ("RGB"),
+ babl_type ("u8"),
+ babl_component ("R"),
+ babl_component ("G"),
+ babl_component ("B"),
NULL);
Babl *rgb8_gamma_2_2 = babl_format_new (
- babl_model_from_name ("R'G'B'"),
- babl_type_from_name ("u8"),
- babl_component_from_name ("R'"),
- babl_component_from_name ("G'"),
- babl_component_from_name ("B'"),
+ babl_model ("R'G'B'"),
+ babl_type ("u8"),
+ babl_component ("R'"),
+ babl_component ("G'"),
+ babl_component ("B'"),
NULL);
Babl *gaF_linear = babl_format_new (
- babl_model_from_name ("YA"),
- babl_type_from_name ("float"),
- babl_component_from_name ("Y"),
- babl_component_from_name ("A"),
+ babl_model ("YA"),
+ babl_type ("float"),
+ babl_component ("Y"),
+ babl_component ("A"),
NULL);
Babl *ga8_linear = babl_format_new (
- babl_model_from_name ("YA"),
- babl_type_from_name ("u8"),
- babl_component_from_name ("Y"),
- babl_component_from_name ("A"),
+ babl_model ("YA"),
+ babl_type ("u8"),
+ babl_component ("Y"),
+ babl_component ("A"),
NULL);
Babl *ga8_gamma_2_2 = babl_format_new (
- babl_model_from_name ("Y'A"),
- babl_type_from_name ("u8"),
- babl_component_from_name ("Y'"),
- babl_component_from_name ("A"),
+ babl_model ("Y'A"),
+ babl_type ("u8"),
+ babl_component ("Y'"),
+ babl_component ("A"),
NULL);
Babl *gF_linear = babl_format_new (
- babl_model_from_name ("Y"),
- babl_type_from_name ("float"),
- babl_component_from_name ("Y"),
+ babl_model ("Y"),
+ babl_type ("float"),
+ babl_component ("Y"),
NULL);
Babl *g8_linear = babl_format_new (
- babl_model_from_name ("Y"),
- babl_type_from_name ("u8"),
- babl_component_from_name ("Y"),
+ babl_model ("Y"),
+ babl_type ("u8"),
+ babl_component ("Y"),
NULL);
Babl *g8_gamma_2_2 = babl_format_new (
- babl_model_from_name ("Y'"),
- babl_type_from_name ("u8"),
- babl_component_from_name ("Y'"),
+ babl_model ("Y'"),
+ babl_type ("u8"),
+ babl_component ("Y'"),
NULL);
tables_init ();
babl_model_new (
"name", "CMYK",
- babl_component_from_name ("cyan"),
- babl_component_from_name ("magenta"),
- babl_component_from_name ("yellow"),
- babl_component_from_name ("key"),
+ babl_component ("cyan"),
+ babl_component ("magenta"),
+ babl_component ("yellow"),
+ babl_component ("key"),
NULL
);
babl_conversion_new (
- babl_model_from_name ("RGBA"),
- babl_model_from_name ("CMYK"),
+ babl_model ("RGBA"),
+ babl_model ("CMYK"),
"linear", rgba_to_cmyk,
NULL
);
babl_conversion_new (
- babl_model_from_name ("CMYK"),
- babl_model_from_name ("RGBA"),
+ babl_model ("CMYK"),
+ babl_model ("RGBA"),
"linear", cmyk_to_rgba,
NULL
);
babl_format_new (
"name", "CMYK float",
- babl_model_from_name ("CMYK"),
- babl_type_from_name ("float"),
- babl_component_from_name ("cyan"),
- babl_component_from_name ("yellow"),
- babl_component_from_name ("magenta"),
- babl_component_from_name ("key"),
+ babl_model ("CMYK"),
+ babl_type ("float"),
+ babl_component ("cyan"),
+ babl_component ("yellow"),
+ babl_component ("magenta"),
+ babl_component ("key"),
NULL
);
#if defined(__GNUC__) && (__GNUC__ >= 4) && defined(USE_SSE) && defined(USE_MMX)
Babl *rgbaF_linear = babl_format_new (
- babl_model_from_name ("RGBA"),
- babl_type_from_name ("float"),
- babl_component_from_name ("R"),
- babl_component_from_name ("G"),
- babl_component_from_name ("B"),
- babl_component_from_name ("A"),
+ babl_model ("RGBA"),
+ babl_type ("float"),
+ babl_component ("R"),
+ babl_component ("G"),
+ babl_component ("B"),
+ babl_component ("A"),
NULL);
Babl *rgba8_linear = babl_format_new (
- babl_model_from_name ("RGBA"),
- babl_type_from_name ("u8"),
- babl_component_from_name ("R"),
- babl_component_from_name ("G"),
- babl_component_from_name ("B"),
- babl_component_from_name ("A"),
+ babl_model ("RGBA"),
+ babl_type ("u8"),
+ babl_component ("R"),
+ babl_component ("G"),
+ babl_component ("B"),
+ babl_component ("A"),
NULL);
Babl *rgb8_linear = babl_format_new (
- babl_model_from_name ("RGB"),
- babl_type_from_name ("u8"),
- babl_component_from_name ("R"),
- babl_component_from_name ("G"),
- babl_component_from_name ("B"),
+ babl_model ("RGB"),
+ babl_type ("u8"),
+ babl_component ("R"),
+ babl_component ("G"),
+ babl_component ("B"),
NULL);
if ((babl_cpu_accel_get_support () & BABL_CPU_ACCEL_X86_MMX) &&
fish = babl_fish (
babl_format_new (
- babl_model_from_name ("Y"),
- babl_type_from_name ("float"),
- babl_component_from_name ("Y"),
+ babl_model ("Y"),
+ babl_type ("float"),
+ babl_component ("Y"),
NULL
),
babl_format_new (
- babl_model_from_name ("RGB"),
- babl_type_from_name ("float"),
- babl_component_from_name ("R"),
- babl_component_from_name ("G"),
- babl_component_from_name ("B"),
+ babl_model ("RGB"),
+ babl_type ("float"),
+ babl_component ("R"),
+ babl_component ("G"),
+ babl_component ("B"),
NULL
)
);
fish = babl_fish (
babl_format_new (
- babl_model_from_name ("RGB"),
- babl_type_from_name ("u8"),
- babl_component_from_name ("R"),
- babl_component_from_name ("G"),
- babl_component_from_name ("B"),
+ babl_model ("RGB"),
+ babl_type ("u8"),
+ babl_component ("R"),
+ babl_component ("G"),
+ babl_component ("B"),
NULL
),
babl_format_new (
- babl_model_from_name ("RGB"),
- babl_type_from_name ("u8"),
- babl_component_from_name ("B"),
- babl_component_from_name ("G"),
- babl_component_from_name ("R"),
+ babl_model ("RGB"),
+ babl_type ("u8"),
+ babl_component ("B"),
+ babl_component ("G"),
+ babl_component ("R"),
NULL
)
);
fish = babl_fish (
babl_format_new (
- babl_model_from_name ("RGB"),
- babl_type_from_name ("float"),
- babl_component_from_name ("R"),
- babl_component_from_name ("G"),
- babl_component_from_name ("B"),
+ babl_model ("RGB"),
+ babl_type ("float"),
+ babl_component ("R"),
+ babl_component ("G"),
+ babl_component ("B"),
NULL
),
babl_format_new (
- babl_model_from_name ("Y'CbCr"),
- babl_type_from_name ("float"),
- babl_component_from_name ("Y'"),
- babl_component_from_name ("Cb"),
- babl_component_from_name ("Cr"),
+ babl_model ("Y'CbCr"),
+ babl_type ("float"),
+ babl_component ("Y'"),
+ babl_component ("Cb"),
+ babl_component ("Cr"),
NULL
)
);